package com.example.mtblog.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class ArticleInfo {


    private Integer id;
    private Integer createBy;

    private Integer likeNum; //喜欢数量
    private Boolean isLike;

    private Integer collectNum; //收藏数量
    private Boolean isCollect;

    private Integer  popingCommentId; //置顶Id
    private Integer commentNum; // 评论数量
    private Integer readNum; //阅读数量

    private Integer hotNum; //热度

    public void init(ArticleInfo articleInfo){
        articleInfo.collectNum = 0;
        articleInfo.likeNum = 0;
        articleInfo.readNum =0;
        articleInfo.commentNum=0;
        articleInfo.hotNum = 0 ;

        articleInfo.isLike = false;
        articleInfo.isCollect = false;

    }
}


